﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
namespace CMN.Entity
{
      ///<summary>
    ///Module_ArticleEntity实体类(文章)
    ///</summary>
    [Serializable]
    public partial class Module_ArticleEntity : Module_ListInfo
    {
        public Module_ArticleEntity()
        {

        }

       

        public Module_ArticleEntity(SerializationInfo info, StreamingContext content)
        {
            Id = info.GetInt32("Id");
            ChannelId = info.GetInt32("ChannelId");
            Path = info.GetString("Path");
            Title = info.GetString("Title");
            TColor = info.GetString("TColor");
            AddDate = info.GetDateTime("AddDate");
            Summary = info.GetString("Summary");
            Author = info.GetString("Author");
            Editor = info.GetString("Editor");
            ViewNum = info.GetInt32("ViewNum");
            Img = info.GetString("Img");
            OrderNum = info.GetInt32("OrderNum");
            UserId = info.GetInt32("UserId");
            SourceFrom = info.GetString("SourceFrom");
            AgainstNum = info.GetInt32("AgainstNum");
            SupportNum = info.GetInt32("SupportNum");
            Url = info.GetString("Url");
            Flag = info.GetString("Flag");
            Tags = info.GetString("Tags");
            TopTime = info.GetDateTime("TopTime");

            IsImg = info.GetBoolean("IsImg");
            ReadGroup = info.GetInt32("ReadGroup");
            TextContent = info.GetString("TextContent");
            WriteComment = info.GetInt32("WriteComment");
            ReadComment = info.GetInt32("ReadComment");
            IsPass = info.GetInt16("IsPass");
            Remark = info.GetString("Remark");
        }
        public override  void GetObjectData(SerializationInfo info, StreamingContext content)
        {
            info.AddValue("Id", Id);
            info.AddValue("ChannelId", ChannelId);
            info.AddValue("Path", Path);
            info.AddValue("Title", Title);
            info.AddValue("TColor", TColor);
            info.AddValue("AddDate", AddDate);
            info.AddValue("Summary", Summary);
            info.AddValue("Author", Author);
            info.AddValue("Editor", Editor);
            info.AddValue("ViewNum", ViewNum);
            info.AddValue("Img", Img);
            info.AddValue("OrderNum", OrderNum);
            info.AddValue("UserId", UserId);
            info.AddValue("SourceFrom", SourceFrom);
            info.AddValue("SupportNum", SupportNum);
            info.AddValue("AgainstNum", AgainstNum);
            info.AddValue("Url", Url);
            info.AddValue("Flag", Flag);
            info.AddValue("Tags", Tags);
            info.AddValue("TopTime", TopTime);
            info.AddValue("IsPass", IsPass);
            info.AddValue("IsImg", IsImg);
            info.AddValue("ReadGroup", ReadGroup);
            info.AddValue("TextContent", TextContent);
            info.AddValue("WriteComment", WriteComment);
            info.AddValue("ReadComment", ReadComment);
  
            info.AddValue("Remark", Remark);
        }
        
        #region "Private Variables"
        private DataTableAction _DataTableAction_;  // 操作方法 Insert:增加 Update:修改 Delete:删除

      
        private bool _IsImg=false; // 是否图片
     

        private Int32 _ReadGroup=0; // 读取文章权限

        private String _TextContent=""; // 文章内容
        private Int32 _WriteComment=0; // 评论权限
        private Int32 _ReadComment=0; // 查看评论权限

        private DateTime searchUpdateTime=DateTime.MinValue;
        private string searchContent = "";
        private int _IsPass = 0; // 是否审核
        private string _Remark = string.Empty;

        #endregion

        #region "Public Variables"
        ///<summary>
        /// 操作方法 Insert:增加 Update:修改 Delete:删除
        ///</summary>
        public DataTableAction DataTable_Action
        {
            set { this._DataTableAction_ = value; }
            get { return this._DataTableAction_; }
        }
        /// <summary>
        /// 相关搜索更新时间
        /// </summary>
        public DateTime SearchUpdateTime
        {
            set { this.searchUpdateTime = value; }
            get { return this.searchUpdateTime; }
        }
        /// <summary>
        /// 搜索相关内容
        /// </summary>
        public string SearchContent
        {
            set { this.searchContent = value; }
            get { return this.searchContent; }
        }
       
        /// <summary>
        /// 是否图片
        /// </summary>
        public bool  IsImg
        {
            set { this._IsImg = value; }
            get { return this._IsImg; }
        }
        /// <summary>
        /// 是否审核
        /// </summary>
        public int IsPass
        {
            set { this._IsPass = value; }
            get { return this._IsPass; }
        }
        /// <summary>
        /// 读取文章权限
        /// </summary>
        public Int32  ReadGroup
        {
            set { this._ReadGroup = value; }
            get { return this._ReadGroup; }
        }
     
        /// <summary>
        /// 文章内容
        /// </summary>
        public String  TextContent
        {
            set { this._TextContent = value; }
            get { return this._TextContent; }
        }
        /// <summary>
        /// 评论权限
        /// </summary>
        public Int32  WriteComment
        {
            set { this._WriteComment = value; }
            get { return this._WriteComment; }
        }
        /// <summary>
        /// 查看评论权限
        /// </summary>
        public Int32  ReadComment
        {
            set { this._ReadComment = value; }
            get { return this._ReadComment; }
        }

       
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark
        {
            set { this._Remark = value; }
            get{return this._Remark;}
        }

        public int PageCount { get; set; }

        public List<PageInfo> PageList { get; set; }

        public string checkboxgrupflag { get; set; }
        public string checkboxgruptoptime { get; set; }
        /// <summary>
        /// 是否索引
        /// </summary>
        public bool IsCreateIndex { get; set; }
       
        #endregion
    }

    public class PageInfo{
        public int PageNum{get;set;}
    }
}
